const logger = require('./builder.log');

let exec = require('child_process').exec;
let execCmd = function (cmd) {
    return  function(cb) {
        exec(cmd,function(err,stdout,stderr) {
            if (err){
                logger.error(stderr);
                cb(null,false);
            }else{
                cb(null,stdout);
            }
        });
    };
}

module.exports = {
    exec: execCmd
};
